package com.ktgj.customer.mapper;

import com.ktgj.customer.domain.InsuranceRecord;
import com.ktgj.customer.domain.vo.TmpGuaranteeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InsuranceRecordMapper {

    /**
     * 新增保险记录
     */
    public int insertInsuranceRecord(InsuranceRecord insuranceRecord);

    /**
     * 后端——查询保险记录
     * */
    public List<InsuranceRecord> backSelectInsuranceRecord(Long customerId);

    /**
     * 查询指定信息
     * */
    public InsuranceRecord selectInsuranceRecord(Long insRecordId);

    /**
     * 获取会员随卡保险数量
     * */
    public List<InsuranceRecord> insuranceRecordList(Long customerId);

    /**
     * 获取指定保险的开保记录
     * */
    public InsuranceRecord insuranceRecordByGuaranteeId(Long guaranteeId);

    /**
     * 通过会员id、保险类型id、保险公司id，获取保险开保记录列表
     */
    public List<InsuranceRecord> selInsuranceRecordList(@Param("customerId") Long customerId,
                                                        @Param("insTypeId") Long insTypeId,
                                                        @Param("companyId") Long companyId);

    /**
     * 查询所有未过期保险信息
     * */
    public List<InsuranceRecord> expiredStartList();

    /**
     * 修改
     * */
    public int updateInsuranceRecord(InsuranceRecord insuranceRecord);

    /**
     * 修改德付通保险状态（远程）
     * */
    public int updateStart(InsuranceRecord insuranceRecord);

    /**
     * 保险开保信息列表
     * */
    public List<InsuranceRecord> openInsuranceList(TmpGuaranteeVo tmpGuaranteeVo);
}
